<%--
    Document   : paziente
    Created on : 7-dic-2011, 13.08.07
    Author     : sestari
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <link rel="stylesheet" type="text/css" href="../style_generale.css" />
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

            <f:loadBundle basename="message.message" var="msg"/>
            <title> <h:outputText value="#{msg.modificapassemail}"/> </title>

        </head>


        <body>
            <h:form>
                <h:selectOneMenu id="combo" value="#{beanMedico.idpaziente}" onchange="submit()" immediate="true"  styleClass="buttoncomlu">
                    <f:selectItems value="#{beanMedico.nomeComboBox}"  />
                </h:selectOneMenu>
            </h:form>

            <h:form>
                <h:dataTable value="#{beanMedico.anagrafica}" var="ana"
                             style="overflow:auto; width:100%; height:50px"
                             styleClass="orders" headerClass="ordersHeader" columnClasses="evenColumn,oddColumn">
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.nome}"/>
                        </f:facet>
                        <h:outputText  id="nome" value="#{beanMedico.paziente.nome}" />                        
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.cognome}"/>
                        </f:facet>
                        <h:outputText id="cognome" value="#{beanMedico.paziente.cognome}" />                        
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.e_mail}"/>
                        </f:facet>

                        <h:inputText  styleClass="campoUptade" id="email" value="#{beanMedico.paziente.email}" maxlength="45" validator="#{beanValidador.verificaMail}" required="true" requiredMessage="Invalid!"/>
                        <h:message for="email" styleClass="errors"  showSummary="no" />
                        <h:messages globalOnly="true" styleClass="errors"/>
                    </h:column>

                    <h:column>

                        <f:facet name="header">
                            <h:outputText value="#{msg.luogonascita}"/>
                        </f:facet>

                        <h:outputText id="luogonascita" value="#{beanMedico.paziente.luogo_nascita}" />

                    </h:column>

                    <h:column>

                        <f:facet name="header">
                            <h:outputText value="#{msg.indirizzo}"/>
                        </f:facet>

                        <h:inputText  id="indirizzo"  value="#{beanMedico.paziente.indirizzo}" styleClass="campoUptade" required="true" requiredMessage="Invalid!"/>
                        <h:message for="indirizzo" styleClass="errors"  showSummary="no" />
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.cap}"/>
                        </f:facet>

                        <h:inputText value="#{beanMedico.paziente.cap}" styleClass="campoUptade" />
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.latitudine}"/>
                        </f:facet>

                        <h:inputText value="#{beanMedico.paziente.cooX}" styleClass="campoUptade"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="#{msg.longitudine}"/>
                        </f:facet>

                        <h:inputText value="#{beanMedico.paziente.cooY}" styleClass="campoUptade"/>
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <h:outputText value="Update" />
                        </f:facet>
                        <h:commandButton value="Update" action="#{beanMedico.modDataAnagrafica()}" styleClass="buttoncombo"/>
                    </h:column>
                </h:dataTable>


            </h:form>
            <h:form>
                <h:commandButton value="#{msg.back}" action="back" styleClass="button"/>

            </h:form>
            <br>
            <br>
            <br>
            <%@ include file="/lingua/lingua.jsp" %>
        </body>
        <html>
        </f:view>
